package org.come.control;

import java.awt.Component;

import org.come.Frame.LotteryCPJframe;
import org.come.Jpanel.LotteryCPJpanel;
import org.come.action.FromServerAction;
import org.come.until.FormsManagement;
/**
 * 全民竞猜
 * @author Administrator
 *
 */
public class QmjcControl implements FromServerAction {
    @Override
    public void controlMessFromServer(String mes,String type) {
        //system.out.println("mes:" + mes);
        //打开
        if (mes.contains("QPEN")) {
            //设置往期数据
            if(mes.length()>0) {
            	if(mes.split("=").length>1) {
            		if(mes.split("=")[1].length()>0) {
            			if(mes.split("=")[1].split(",").length>0) {
            				LotteryCPJpanel.previousmsg = mes.split("=")[1].split(",")[0];
            			}
            			if(mes.split("=")[1].split(",").length>1) {
            				LotteryCPJpanel.previousmsg1 = mes.split("=")[1].split(",")[1];
            			}
            			if(mes.split("=")[1].split(",").length>2) {
            				LotteryCPJpanel.previousmsg2 = mes.split("=")[1].split(",")[2];
            			}
            		}
            	}
            }
        }else if(mes.contains("RECORD")) {
        	//设置往期数据
            if(mes.length()>0) {
            	if(mes.split("=").length>1) {
            		if(mes.split("=")[1].length()>0) {
            			LotteryCPJpanel.previousmsg3 = mes.split("=")[1].split("\\|");
            		}
            	}
            }
            LotteryCPJframe.getLotteryCPJpanel().deleteScrollPane();
            LotteryCPJpanel.getlisysta();
            LotteryCPJframe.getLotteryCPJpanel().getjScrollPane();
        }
    }
}
